package com.zh.auth.domain.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;

@Data
@ApiModel("注册实体")
public class RegisterDto implements Serializable {

    private static final long serialVersionUID = 1L;
    /**
     * 用户名
     */
    @ApiModelProperty(value = "用户名",required = true)
    @NotNull(message = "用户名不能为空")
    @NotEmpty(message = "用户名不能为空")
    @Size(min = 6, max = 40,message = "用户名长度在6-40位之间")
    private String username;
    /**
     * 密码
     */
    @ApiModelProperty(value = "密码",required = true)
    @NotNull(message = "密码不能为空")
    @NotEmpty(message = "密码不能为空")
    private String password;
    /**
     * 确认密码
     */
    @ApiModelProperty(value = "确认密码",required = true)
    @NotNull(message = "确认密码不能为空")
    @NotEmpty(message = "确认密码不能为空")
    private String confirmPassword;
    /**
     * 昵称
     */
    @ApiModelProperty("昵称")
    @Size(max = 8,message = "昵称长度不能超过8位")
    private String nickname;
}
